package com.search.poi;

import java.util.ArrayList;
import java.util.List;

import com.search.poi.builder.POIBuilder;
import com.search.poi.domain.User;
import com.search.poi.excel.ExcelUtil;

public class SampleTest {

	public static void main(String[] args) {
		String keywords = "水泥";
		String city = null;//"广州";
		int page = 1;
		int offset = 200;
		List<User> list = new ArrayList<User>();
		
		list = POIBuilder.create().lbs(keywords, city, offset, page).buidler();
		if (!list.isEmpty()) {
			ExcelUtil.writeExcel(list);
		}
		System.out.println("高德总记录数 ： " + list.size());
		page = 0;//百度页数是从0开始计算的
		list = POIBuilder.create().baidu(keywords, city, offset, page, true).buidler();
		if (!list.isEmpty()) {
			ExcelUtil.writeExcel(list);
		}
		System.out.println("百度总记录数 ： " + list.size());
	}
	
}
